Adwaita: linked combos
authorLapo Calamandrei <calamandrei@gmail.com>
Wed, 6 Aug 2014 10:23:47 +0000 (12:23 +0200)
committerLapo Calamandrei <calamandrei@gmail.com>
Wed, 6 Aug 2014 10:23:47 +0000 (12:23 +0200)
gtk/resources/theme/Adwaita/_common.scss
gtk/resources/theme/Adwaita/gtk-contained-dark.css
gtk/resources/theme/Adwaita/gtk-contained.css

index 0f3bb9b2826a858b822b0181dc84f86d14252c93..6c2809be50d64e97304f0d2fe74a198f1afde1c6 100644 (file)
@@ -762,6 +762,36 @@ GtkComboBox {
   }
 }
 
+
+//FIXME: we need a better general solution for button linking
+
+.linked > GtkComboBox > .button {
+  // the combo is a composite widget so the way we do button linkind doesn't
+  // work, special case needed. See
+  // https://bugzilla.gnome.org/show_bug.cgi?id=733979
+
+  &:dir(ltr), &:dir(rtl) { // needed to increase specificity
+    border-radius: 0;
+    border-left-style: none;
+  }
+  &:dir(rtl) {
+    border-right-style: none;
+    border-left-style: solid
+  }
+}
+.linked > GtkComboBox:first-child > .button {
+  border-radius: 3px 0 0 3px;
+  border-left-style: solid;
+}
+.linked > GtkComboBox:last-child > .button {
+  border-radius: 0 3px 3px 0;
+  &:dir(rtl) { border-right-style: solid; }
+}
+.linked > GtkComboBox:only-child > .button {
+  border-radius: 3px;
+  border-style: solid;
+}
+
 /************
  * Toolbars *
  ************/
index 144d3bd6c9bfd9d51100f54912bc6ba3c5e0fafe..bd468d55cd4138ae1284e79766027324c940d9a8 100644 (file)
@@ -881,6 +881,26 @@ GtkComboBox {
       border-left-style: solid;
       border-right-style: none; }
 
+.linked > GtkComboBox > .button:dir(ltr), .linked > GtkComboBox > .button:dir(rtl) {
+  border-radius: 0;
+  border-left-style: none; }
+.linked > GtkComboBox > .button:dir(rtl) {
+  border-right-style: none;
+  border-left-style: solid; }
+
+.linked > GtkComboBox:first-child > .button {
+  border-radius: 3px 0 0 3px;
+  border-left-style: solid; }
+
+.linked > GtkComboBox:last-child > .button {
+  border-radius: 0 3px 3px 0; }
+  .linked > GtkComboBox:last-child > .button:dir(rtl) {
+    border-right-style: solid; }
+
+.linked > GtkComboBox:only-child > .button {
+  border-radius: 3px;
+  border-style: solid; }
+
 /************
  * Toolbars *
  ************/
index c3804916ff29affd47800ad987c58174ae5f9249..e6b91b0eae69b9b0bb8d8e5142339709ee506204 100644 (file)
@@ -873,6 +873,26 @@ GtkComboBox {
       border-left-style: solid;
       border-right-style: none; }
 
+.linked > GtkComboBox > .button:dir(ltr), .linked > GtkComboBox > .button:dir(rtl) {
+  border-radius: 0;
+  border-left-style: none; }
+.linked > GtkComboBox > .button:dir(rtl) {
+  border-right-style: none;
+  border-left-style: solid; }
+
+.linked > GtkComboBox:first-child > .button {
+  border-radius: 3px 0 0 3px;
+  border-left-style: solid; }
+
+.linked > GtkComboBox:last-child > .button {
+  border-radius: 0 3px 3px 0; }
+  .linked > GtkComboBox:last-child > .button:dir(rtl) {
+    border-right-style: solid; }
+
+.linked > GtkComboBox:only-child > .button {
+  border-radius: 3px;
+  border-style: solid; }
+
 /************
  * Toolbars *
  ************/